import React, { useContext } from 'react'
import { Context } from './App.jsx'
// import { Context } from './App'

/* <Context.Consumer>
  {(money) => {
    return <div>{money}</div>
  }}
</Context.Consumer> */
export default function Child2() {
  // todo useContext调用即可获取Provider提供的数据!!!
  const money = useContext(Context)
  console.log(money, 111)

  return <div>Child2-{money}</div>
}
